<!-- 自定义navbar -->
<template>
  <view :style="{ paddingTop: statusBarHeight + 'px',
        backgroundColor: bgColor }">
    
  </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue";
import Bus from "@/utils/bus";
const systemInfo = uni.getSystemInfoSync();
const statusBarHeight = systemInfo.statusBarHeight;

const bgColor = ref('');// 状态栏颜色


onMounted(() => {
  Bus.on('change-theme-color', (color: string) => {
    bgColor.value = color;
  }) 
})
</script>

<style lang="scss" scoped>

</style>